*********************************************************************************************************************
Replication Files for: Elections Improve Support for State Trial Court Judges in the United States

Andrew R. Stone (arstone@olemiss.edu) and Michael P. Olson (michael.p.olson@wustl.edu)
University of Mississippi and Washington University in St. Louis

This version: August 2024, v. 1.0

*********************************************************************************************************************

This repository contains the data and code necessary to replicate the analyses in the manuscript and online appendix.

The analysis was conducted in R (version 4.4.0) running on Windows 10 Enterprise.

Replicators should set the working directory to the directory where they place the script and data, and also create a sub-directory called "figures_tables" that will store the output of the scripts.

*********************************************************************************************************************

Contents

Data:
	weidenbaum_survey_2021.RData
	weidenbaum_survey_2023.RData
	survey2021_experience.RData
	survey2023_experience.RData
	real-life-election-experience.RData

Code:
	survey_analysis_2021.R
	survey_analysis_2023.R
	real_world_experience_analysis.R


*********************************************************************************************************************


The following files are necessary to replicate the listed figures/tables in the article. 

*** Figures 1-3 ***

weidenbaum_survey_2021.RData
survey_analysis_2021.R

*** Table 2 ***

weidenbaum_survey_2023.RData
survey_analysis_2023.R
survey2021_experience.RData
survey2023_experience.RData
real-life-election-experience.RData
real_world_experience_analysis.R

*** Table 3 ***

survey2021_experience.RData
survey2023_experience.RData
real-life-election-experience.RData
real_world_experience_analysis.R

*** Figures 4-5 ***
*** Table 4 ***

weidenbaum_survey_2023.RData
survey_analysis_2023.R

*********************************************************************************************************************

The following files are necessary to replicate the listed figures/tables in the online appendix. 

*** Tables A.1-A.2, B.1 ***
*** Figures A.1, B.1-B.5, E.1 (Panel a) ***

weidenbaum_survey_2021.RData
survey_analysis_2021.R

*** Tables C.1, D.1-D.2, E.1 (Panel b) ***
*** Figures D.1-D.8 ***

weidenbaum_survey_2023.RData
survey_analysis_2023.R

*** Tables F.1-F.4 ***

survey2021_experience.RData
survey2023_experience.RData
real-life-election-experience.RData
real_world_experience_analysis.R

*********************************************************************************************************************

The following R packages are necessary to replicate the analyses in the article and online appendix. 

cjoint (version 2.1.1); dplyr (version 1.1.4); ggcorrplot (version 0.1.4.1); ggplot2 (version 3.5.1); interflex (version 1.2.6); plyr (version 1.8.9); psych (version 2.4.6.26); questionr (version 0.7.8); sandwich (version 3.1-0); stargazer (version 5.2.3); tidyverse (version 2.0.0); vtable (version 1.4.6)

*********************************************************************************************************************

The following variables are used in the analyses found in the paper and appendix.

*** weidenbaum_survey_2021.RData ***

judge_support: Respondent support for judge (1-5 scale, strongly oppose to strongly support).
fairness_accused_crime: Respondent evaluation of judge fairness (1-5 scale, very unfair to vary fair).
legitimacy_additive: Additive index of respondent evaluations of Court legitimacy (scaled to range from 1 to 5, higher values indicate greater legitimacy).
legitimacy_nosc: Additive index of respondent evaluations of Court legitimacy without the state high court question (scaled to range from 1 to 5, higher values indicate greater legitimacy).
legitimacy_1: Respondent evaluation of doing away with state high court (scaled to range from 1 to 5, higher values indicate greater legitimacy).
legitimacy_2: Respondent evaluation of removing judges if they made unpopular decisions (scaled to range from 1 to 5, higher values indicate greater legitimacy).
legitimacy_3: Respondent evaluation of courts having become too independent (scaled to range from 1 to 5, higher values indicate greater legitimacy).             
legitimacy_4: Respondent evaluation of courts having become too mixed up in politics (scaled to range from 1 to 5, higher values indicate greater legitimacy).
elected_any_court: Indicator for whether respondent has an elected court in their state.
GENDER: Respondent gender (1 is male, 2 is female).
RACETHNICITY: Respondent race/ethnicity (1 is White non-Hispanic, 2 is Black non-Hispanic, 3 is Other non-Hispanic, 4 is Hispanic, 5 is 2+ non-Hispanic, 6 is Asian non-Hispanic).
respondent_pid: Respondent partisan identity (coding leaners as partisans).
EDUC5: Respondent education (1 is less than high school, 2 is high school or equivalent, 3 is vocational school or some college, 4 is bachelor's degree, 5 is post-graduate study).
INCOME4: Respondent household income (1-4 scale, 1 is less than $30,000, 2 is $30,000 to under $60,000, 3 is $60,000 to under $100,000, 4 is $100,000 or more).
IDEO: Respondent ideology (1-5 scale, very liberal to very conservative).
black: Indicator for whether respondent is Black.
hispanic: Indicator for whether respondent is Hispanic.
college: Indicator for whether respondent has a college degree or higher.
married: Indicator for whether respondent is married.
employed: Indicator for whether respondent is employed.
democrat: Indicator for whether respondent is a Democrat (coding leaners as partisans).        
republican: Indicator for whether respondent is a Republican (coding leaners as partisans).
INCOME: Respondent household income (1-18 scale, 1 is less than $5000, 2 is $5,000 to $9,999, 3 is $10,000 to $14,999, 4 is $15,000 to $19,999, 5 is $20,000 to $24,999, 6 is $25,000 to $29,999, 7 is $30,000 to $34,999, 8 is $35,000 to $39,999, 9 is $40,000 to $49,999, 10 is $50,000 to $59,999, 11 is $60,000 to $74,999, 12 is $75,000 to $84,999, 13 is $85,000 to $99,999, 14 is $100,000 to $124,999, 15 is $125,000 to $149,999, 16 is $150,000 to $174,999, 17 is $175,000 to $199,999, 18 is $200,000 or more).
INTERNET: Indicator for whether respondent has household internet access.
judge_name: Indicator for judge name/gender treatment they received (1 is James Young, 2 is Janet Young).
judge_race: Indicator for judge race treatment they received (1 is Black, 2 is White, 3 is Hispanic).
election_treatment: Indicator for election treatment they received (1 partisan election, 2 nonpartisan election, 3 appointed).
election_treatment_binary: Binary version of election treatment indicator (1 is election treatment, 2 is appointed).
judge_margin: Indicator for selection margin treatment they received (1 is 52 percent, 2 is 60 percent, 3 is 80 percent).
judge_tenure: Indicator for tenure treatment they received (1 is 1 year, 2 is 5 years, 3 is 15 years).
judge_party: Indicator for judge party treatment they received (1 is Republican, 2 is Democrat, 3 is no information).
judge_sentencing: Indicator for sentencing behavior treatment they received (1 is below average (3), 2 is average (6), 3 is above average (9)).
Knowledge Level: Denotes whether respondent correctly answered 3 knowledge questions or not.
STATE: Respondent state (abbreviation).

*** weidenbaum_survey_2023.RData ***
cant_understand_politics: Respondent evaluation of own ability to understand politics (1-5 scale, higher values indicate higher efficacy).
officials_dont_care: Respondent evaluation of whether politicians care about people like them (1-5 scale, higher values indicate higher efficacy).
elections_make_govt_care: Respondent evaluation of whether elections force politicians to care about the people (1-5 scale, higher values indicate greater support for elections).
local_elections_not_worth: Respondent evaluation of whether local elections are worth bothering with (1-5 scale, higher values indicate greater support for elections).
democracy_satisfaction: Respondent evaluation of satisfaction with how democracy is working in the United States (1-5 scale, higher values indicate greater satisfaction).
ideology_distance_5: Absolute value of distance between respondent self-reported ideology (5pt) and respondent self-reported estimate of judge ideology (5pt) (ranges from 0-4).
punitiveness_distance: Absolute value of distance between respondent self-reported punitiveness (3pt) and judge punitiveness (3pt) (ranges from 0-2).
elected_any_court: Indicator for whether respondent has an elected court in their state.
GENDER: Respondent gender (1 is male, 2 is female).
RACETHNICITY: Respondent race/ethnicity (1 is White non-Hispanic, 2 is Black non-Hispanic, 3 is Other non-Hispanic, 4 is Hispanic, 5 is 2+ non-Hispanic, 6 is Asian non-Hispanic).
Party: Respondent partisan identity (coding leaners as partisans).
EDUC5: Respondent education (1 is less than high school, 2 is high school or equivalent, 3 is associates degree or some college, 4 is bachelor's degree, 5 is post-graduate study).
INCOME4: Respondent household income (1-4 scale, 1 is less than $30,000, 2 is $30,000 to under $60,000, 3 is $60,000 to under $100,000, 4 is $100,000 or more).
IDEO: Respondent ideology (1-5 scale, very liberal to very conservative).
black: Indicator for whether respondent is Black.
hispanic: Indicator for whether respondent is Hispanic.
college: Indicator for whether respondent has a college degree or higher.
married: Indicator for whether respondent is married.
employed: Indicator for whether respondent is employed.
democrat: Indicator for whether respondent is a Democrat (coding leaners as partisans).
republican: Indicator for whether respondent is a Republican (coding leaners as partisans).
INCOME: Respondent household income (1-18 scale, 1 is less than $5000, 2 is $5,000 to $9,999, 3 is $10,000 to $14,999, 4 is $15,000 to $19,999, 5 is $20,000 to $24,999, 6 is $25,000 to $29,999, 7 is $30,000 to $34,999, 8 is $35,000 to $39,999, 9 is $40,000 to $49,999, 10 is $50,000 to $59,999, 11 is $60,000 to $74,999, 12 is $75,000 to $84,999, 13 is $85,000 to $99,999, 14 is $100,000 to $124,999, 15 is $125,000 to $149,999, 16 is $150,000 to $174,999, 17 is $175,000 to $199,999, 18 is $200,000 or more).
INTERNET: Indicator for whether respondent has household internet access.
judge_name: Indicator for judge name/gender treatment they received (1 is James Young, 2 is Janet Young).
judge_race: Indicator for judge race treatment they received (1 is Black, 2 is White, 3 is Hispanic).
election_treatment: Indicator for election treatment they received (1 partisan election, 2 nonpartisan election, 3 appointed).
election_treatment_binary: Binary version of election treatment indicator (1 is election treatment, 2 is appointed).
judge_margin: Indicator for selection margin treatment they received (1 is 52 percent, 2 is 60 percent, 3 is 80 percent).
judge_tenure: Indicator for tenure treatment they received (1 is 1 year, 2 is 5 years, 3 is 15 years).
judge_party: Indicator for judge party treatment they received (1 is Republican, 2 is Democrat, 3 is no information).
judge_sentencing: Indicator for sentencing behavior treatment they received (1 is below average (3), 2 is average (6), 3 is above average (9)).
Knowledge Level: Denotes whether respondent correctly answered 3 knowledge questions or not.
judge_support: Respondent support for judge (1-5 scale, strongly oppose to strongly support).
STATE: Respondent state (abbreviation).

*** survey2021_experience.RData ***

STATE: Respondent state (abbreviation).
election_treatment: Indicator for election treatment respondent received (1 partisan election, 2 nonpartisan election, 3 appointed).
judge_support: Respondent support for judge (1-5 scale, strongly oppose to strongly support).
legitimacy_additive: Additive index of respondent evaluations of Court legitimacy (scaled to range from 1 to 5, higher values indicate greater legitimacy).

*** survey2023_experience.RData ***

STATE: Respondent state (abbreviation).
election_treatment: Indicator for election treatment respondent received (1 partisan election, 2 nonpartisan election, 3 appointed).
judge_support: Respondent support for judge (1-5 scale, strongly oppose to strongly support). 

*** real-life-election-experience.RData ***

state: State name.
abbreviation: State abbreviation.
elected_sc: Indicator for whether state has an elected high court.
elected_any_court: Indicator for whether state has an elected court.
partisan_sc_elections: Indicator for whether state has partisan high court elections (states without an elected high court are coded as NA).
partisan_any_court: Indicator for whether state has a partisan court election (states without an elected court are coded as NA).

